package com.zmn.plat.persistence.interfaces.channel.workorder.picture;

import com.zmn.plat.model.entity.channel.workorder.picture.ChannelWorkOrderPicture;
import com.zmn.plat.model.entity.channel.workorder.picture.ChannelWorkOrderPictureQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;



/**
 * 渠道-工单照片
 * 
 * @author linfeng
 *
 * @since 2020-09-16 16:54:03
 */
public interface ChannelWorkOrderPictureDao {

    /**
     * 查询
     * @param id ID
     * @return
     */
    ChannelWorkOrderPicture findByKey(Integer id);

    /**
     * 查询最大的排序
     *
     * @return
     */
    Integer findMaxSort();

    /**
     * 分页搜索
     * @param query 条件
     * @return 列表
     */
    List<ChannelWorkOrderPicture> listPageByQuery(ChannelWorkOrderPictureQuery query);

    /**
     * 搜索
     * @param query 条件
     * @return
     */
    List<ChannelWorkOrderPicture> listByQuery(ChannelWorkOrderPictureQuery query);

    /**
     * 所有数据
     * @return
     */
    List<ChannelWorkOrderPicture> listAll();

    /**
     * 统计
     * @param query 条件
     * @return
     */
    Integer countByQuery(ChannelWorkOrderPictureQuery query);
    /**
     * 更新排序
     * @param channelWorkOrderPicture
     * @return
     */
    Integer updateSortByKey(ChannelWorkOrderPicture channelWorkOrderPicture);

    /**
     * 更新后台审核标志
     * @param channelWorkOrderPicture
     * @return
     */
    Integer updateAuditFlagByKey(ChannelWorkOrderPicture channelWorkOrderPicture);

    /**
     * 更新后台自动审核标志
     * @param channelWorkOrderPicture
     * @return
     */
    Integer updateAutoAuditFlagByKey(ChannelWorkOrderPicture channelWorkOrderPicture);

    /**
     * 更新必传标志
     * @param channelWorkOrderPicture
     * @return
     */
    Integer updateRequiredFlagByKey(ChannelWorkOrderPicture channelWorkOrderPicture);

    /**
     * 更新
     * @param channelWorkOrderPicture
     * @return
     */
    Integer updateByKey(ChannelWorkOrderPicture channelWorkOrderPicture);

    /**
     * 插入
     * @param channelWorkOrderPicture
     * @return
     */
    Integer insert(ChannelWorkOrderPicture channelWorkOrderPicture);

    /**
     * 删除
     * @param id ID
     * @return
     */
    Integer deleteByKey(Integer id);

    /**
     * 描述: 从旧渠道复制到新渠道
     *
     * @param originalChannelId 原渠道ID
     * @param targetChannelId 新渠道ID
     * @param operator 操作者
     * @return java.lang.Boolean
     * @author guoqiao
     * @since 2021/6/8 13:49
     */
    void copy(Integer originalChannelId, Integer targetChannelId, String operator);

    /**
     * 描述: 渠道ID删除
     *
     * @param channelId channelId
     * @author jiafei
     * @since 2022/4/6 21:09
     */
    void deleteByChannelId(@Param("channelId") Integer channelId);
}
